﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel.DataAnnotations;

using mvcForum.Core;

namespace mvcForum.Web.ViewModels {

	public class CategoryViewModel : ForumViewModelBase {

		public CategoryViewModel() : base() { }
		public CategoryViewModel(Category category) : base() {
			this.Id = category.Id;
			this.Name = category.Name;
			this.SortOrder = category.SortOrder;
		}

		public Int32 Id { get; set; }
		[Required]
		public String Name { get; set; }
		[Required]
		public Int32 SortOrder { get; set; }

		public IEnumerable<ForumViewModel> Forums { get; set; }
	}
}